package com.isoft.c2team3service2.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("hot_post")
public class HotPost {
    @TableId(type = IdType.AUTO)
    private Long id;

    private String title;
    private String source;
    private String imgSrc;
    private String time;
    private Boolean isAd;
    private Boolean isHot;
    private Integer likeCount;
    private Integer sortOrder;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    // 关键修正：postId 类型改为 Integer，与 Post 表 id 类型匹配
    // 并添加非空约束和关联说明
    private Integer postId; // 关联 post 表的 id 字段
}